Backport: Skip pull_request triggered runs in private repos - 5.8 Branch - #12978
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 5.8 Branch#12978desrosj wants to merge 1 commit into
desrosj wants to merge 1 commit into
Conversation
This modifies the conditions for GitHub Actions workflow runs so that they do not run within private forks and mirrors for `pull_request` events when the PR is in `draft` status. For situations where this may be desirable, a `Draft Workflow Runs` label can be added to a `draft` pull request to force workflows to run. Props desrosj, jorbin. See #65848. git-svn-id: https://develop.svn.wordpress.org/trunk@63183 602fd350-edb4-49c9-b593-d223f7449a82
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports 15c4b04 (r63183) to the 5.8 branch.
Merge Conflict Resolution
The cherry-pick conflicted. The 5.8 branch only has 6 workflow files, and the ones it does have are shaped differently than on
trunk. Here is exactly what was done:Files that do not exist on 5.8 (hunks dropped entirely). The cherry-pick reported these as
modify/deleteconflicts and left thetrunkversion of each file in the tree. Each was removed withgit rmso no new workflow files are introduced to this branch:.github/workflows/javascript-type-checking.yml.github/workflows/performance.yml.github/workflows/phpstan-static-analysis.yml.github/workflows/test-and-zip-default-themes.yml.github/workflows/upgrade-develop-testing.yml.github/workflows/workflow-lint.ymlBecause
upgrade-develop-testing.ymlandworkflow-lint.yml(and theirreusable-*counterparts) do not exist on 5.8, theuses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk→uses: ./.github/workflows/<x>.ymlportion of the original commit was not carried over.Files that applied cleanly:
end-to-end-tests.yml(e2e-testsjob)test-build-processes.yml(test-core-build-processjob)Files with content conflicts, resolved by hand:
coding-standards.yml— thephpcsjob conflicted because 5.8 passeswith: php-version: '7.4'immediately after theif:line. Resolved by keeping the branch'swith:block and replacing only theif:condition. Thejshintjob merged cleanly.javascript-tests.yml— thetest-jsjob conflicted because 5.8 passeswith: disable-apparmor: trueafter theif:line. Resolved by keeping the branch'swith:block and replacing only theif:condition.php-compatibility.yml— thephp-compatibilityjob conflicted for the same reason asphpcs(with: php-version: '7.4'). Resolved the same way.phpunit-tests.yml— large conflict. Ontrunkthis file hasprepare-gutenberg,test-with-mysql,test-with-mariadb,test-innovation-releases,html-api-test-groups, andlimited-matrix-for-forksjobs. On 5.8 there is a singletest-phpjob that callsreusable-phpunit-tests-v2.ymland usessecrets: inherit. All incoming job definitions fromtrunkwere dropped, the branch'ssecrets: inheritline was preserved, and the new condition was applied only to the existingtest-phpjob. ThestartsWith( github.repository, 'WordPress/' ) && (...)and fork-only (! startsWith(...)) variants from the original commit have no equivalent on 5.8, so those shapes were not needed here.Jobs deliberately left untouched:
slack-notificationsandfailed-workflowjobs (gated ongithub.event_name != 'pull_request', unaffected).test-build-processes.yml→test-core-build-process-macos, which is gated ongithub.repository == 'WordPress/wordpress-develop'only and is not part of the condition family this commit changes.Verification performed: the diff against
5.8touches only.github/workflows/; no conflict markers remain; all six workflow files parse as valid YAML.Use of AI Tools
This pull request was created by an AI agent (Claude Code). Until this PR is marked "Ready for Review", treat it as untrusted, AI-created code that requires a manual review by a human team member.